#!/bin/bash

# 前端测试脚本

echo "开始前端测试..."

cd video2text-frontend

# 安装测试依赖
echo "安装测试依赖..."
npm install --save-dev jest @vue/test-utils @testing-library/vue puppeteer || exit 1

# 运行单元测试
echo "运行单元测试..."
npm run test:unit

# 运行E2E测试
echo "运行E2E测试..."
npm run test:e2e

echo "前端测试完成!"
echo "测试结果: video2text-frontend/coverage/lcov-report/index.html" 